import Layout from '@/layout/index.vue'
import { CloudDownload, RecentlyViewed, Cloud } from '@vicons/carbon'
import { PodcastsTwotone } from '@vicons/material'
import { Collections20Regular, Heart16Regular } from '@vicons/fluent'
import { renderIcon } from '@/utils/index'
export const constantRoutes = [
    {
        path: '/discover',
        name: 'Discover',
        component: () => import(/* webpackChunkName: "discover" */ '@/views/base/discover/index.vue'),
        meta: {
            title: '发现音乐',
            group: 'base',
            page: 'discover'
        }
    },
    {
        path: '/podcast',
        name: 'Podcast',
        component: () => import(/* webpackChunkName: "podcast" */ '@/views/base/podcast/index.vue'),
        meta: {
            title: '播客',
            group: 'base',
            page: 'podcast'
        }
    },
    {
        path: '/mvs',
        name: 'Mvs',
        component: () => import(/* webpackChunkName: "mvs" */ '@/views/base/mvs/index.vue'),
        meta: {
            title: '视频',
            group: 'base',
            page: 'mvs'
        }
    },
    {
        path: '/friends',
        name: 'Friends',
        component: () => import(/* webpackChunkName: "friends" */ '@/views/base/friends/index.vue'),
        meta: {
            title: '朋友',
            group: 'base',
            page: 'friends'
        }
    },
    {
        path: '/live',
        name: 'Live',
        component: () => import(/* webpackChunkName: "live" */ '@/views/base/live/index.vue'),
        meta: {
            title: '直播',
            group: 'base',
            page: 'live'
        }
    },
    {
        path: '/fm',
        name: 'FM',
        component: () => import(/* webpackChunkName: "fm" */ '@/views/base/fm/index.vue'),
        meta: {
            title: '私人FM',
            group: 'base',
            page: 'fm'
        }
    },
    {
        path: '/download',
        name: 'Download',
        component: () => import(/* webpackChunkName: "download" */ '@/views/my-music/download/index.vue'),
        meta: {
            title: '本地与下载',
            group: 'my-music',
            page: 'download',
            icon: renderIcon(CloudDownload),
        }
    },
    {
        path: '/recent',
        name: 'Recent',
        component: () => import(/* webpackChunkName: "recent" */ '@/views/my-music/recent/index.vue'),
        meta: {
            title: '最近播放',
            group: 'my-music',
            page: 'recent',
            icon: renderIcon(RecentlyViewed),
        }
    },
    {
        path: '/songsheet/mylike',
        name: 'SongSheet',
        component: () => import(/* webpackChunkName: "songsheet" */ '@/views/song-sheet.vue'),
        meta: {
            title: '我喜欢的音乐',
            group: 'my-create',
            page: 'songsheet',
            icon: renderIcon(Heart16Regular),
        }
    }
]
export const loginRoutes = [
    {
        path: '/cloud',
        name: 'Cloud',
        component: () => import(/* webpackChunkName: "cloud" */ '@/views/my-music/cloud/index.vue'),
        meta: {
            title: '我的音乐云盘',
            group: 'my-music',
            page: 'cloud',
            icon: renderIcon(Cloud),
        }
    },
    {
        path: '/mypodcast',
        name: 'MyPodcast',
        component: () => import(/* webpackChunkName: "mypodcast" */ '@/views/my-music/my-podcast/index.vue'),
        meta: {
            title: '我的播客',
            group: 'my-music',
            page: 'mypodcast',
            icon: renderIcon(PodcastsTwotone),
        }
    },
    {
        path: '/collect',
        name: 'Collect',
        component: () => import(/* webpackChunkName: "collect" */ '@/views/my-music/collect/index.vue'),
        meta: {
            title: '我的收藏',
            group: 'my-music',
            icon: renderIcon(Collections20Regular),
            page: 'collect'
        }
    }
]
const otherRoutes = [
    {
        path: '/songsheet',
        name: 'SongSheet',
        component: () => import(/* webpackChunkName: "discosongsheetver" */ '@/components/SongSheet/index.vue'),
    }
]
export default [
    {
        path: '/',
        redirect: '/discover',
        name: 'Layout',
        component: Layout,
        children: [...constantRoutes, ...otherRoutes]
    },
    {
        path: '/404',
        component: () => import(/* webpackChunkName: "404" */ '@/views/404.vue')
    },
    {
        path: '/:catchAll(.*)',
        redirect: '/404'
    }
]

// {
//     path: '/songsheet',
//     name: 'SongSheet',
//     component: () => import(/* webpackChunkName: "songsheet" */ '@/views/song-sheet.vue'),
//     meta: {
//         title: '最近播放',
//         group: 'my-music',
//         page: 'songsheet'
//     }
// },